<?php $intro = $this->db->where('code', 'introduction')->get('article')->row_array();?>
<?php $map = $this->db->where('code', 'map')->get('article')->row_array();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
	<title>Домашняя Страница - Tingo</title>
    <link type="text/css" href="<?php echo base_url('assets/css/style.css'); ?>" rel="stylesheet"/>
    <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-1.8.3.min.js'); ?>"></script>
    <script type="text/javascript" src="<?php echo base_url('assets/js/main.js'); ?>"></script>
    <style type="text/css">    #dialog-wrapper {
            display: none;
            position: fixed;
            width: 100%;
            height: 100%;
            background: #000;
            opacity: 0.5;
            z-index: 999998;
            top: 0;
            left: 0;
        }

        #dialog {
            width: 500px;
            height: auto;
            background: none repeat scroll 0 0 #777777;
            border: 1px solid #DDDDDD;
            font-size: 13.5px;
            margin: 0 auto;
            position: fixed;
            top: 30%;
            left: 30%;
            z-index: 999999;
            padding: 10px;
        }

        #dialog .sanpham {
            height: auto;
            background: #fff;
            margin: auto;
            position: relative;
        }

        #dialog .sanpham h2 {
            margin: 0;
            padding: 0;
            font-size: 16px;
            position: absolute;
            left: 10px;
            top: 10px;
        }

        #dialog .sanpham img {
            margin-top: 30px;
        }

        #dialog .sanpham span {
            margin: 0;
            padding: 0;
            font-size: 13px;
            position: absolute;
            display: block;
            text-align: right;
            right: 10px;
            top: 10px;
        }

        #dialog .sanpham .chitiet {
            padding: 10px;
        }</style>
</head>
<body>
<div id="backgroup-index">
    <div id="logo"></div>
    <div id="wapper">
		<div id="nutgh" onclick="giohang();" style="margin-bottom: 5px;"><span style="color: #e10202; margin-left: 5px; ">(<?php echo count( $this->cart->contents()); ?>) &#32; &#32;</span>Корзина</div>
        <div id="search">
            <form method="post">
                <input id="btn" type="submit" value="" style="width: 100px;height: 27px;float: right;margin-top: 1px"/>
                <input type="text" style="width: 360px;height: 30px;float: right " class="icontext"/>

            </form>
        </div>
        <div id="main2"></div>
        <div id="main">
            <div id="header">
                <ul>
                    <li><a href="<?php echo base_url('/index.php/index'); ?>">Домашняя Страница   </a></li>
                    <li><a href="#" onclick="giohang();">Оформить 3аказ</a><span style="color: #e10202; margin-left: 5px; ">(<?php echo count( $this->cart->contents()); ?>) &#32; &#32;</span></li>
                    <li><a href="<?php echo base_url('/index.php/map');?>">Контакты</a></li>
                    <li><a href="<?php echo base_url('/index.php/gioithieu'); ?>">О Нас </a></li>
                </ul>
            </div>
            <div id="main_left">
                <div class="menu-left"><h2 style="background-color:#0066ff;color: #ffffff">
                        Каталог Продукции</h2>       
<?php           if(isset($category)) {            
					foreach($category as $i=>$item) {            ?>
                    <h2 class="h2 h2-<?php echo $i ?>">
                        <a href="<?php echo base_url('/index.php/product'); ?>?catid=<?php echo $item['id'] ?>">
							<?php echo $item['name'];?>
						</a>
                    </h2>
                    <ul>
						<?php
						foreach ($item['items'] as $child) { ?>
								<li><span>                            
									<a href="<?php echo base_url('/index.php/product'); ?>?catid=<?php echo $child['id'] ?>"> 
										<?php echo $child['name'];?>
									</a>
								</span></li>                
				<?php 	}?>
					</ul>
<?php            	}
				}?>
                    
                </div>
                <div class="contact"><h2>Oнлайн-Поддержка</h2>

                    <div class="img-contact"><img src="<?php echo base_url('assets/images/phone.jpg'); ?>"> <strong
                            style="top: 0;left: 100px;">Телефон, факс:</strong><br/> <span style="top: 20px;">+7(945) 988 7693</span>
                        <br/> <span style="top: 40px;">+7(499) 161 4177</span> <br/> <strong
                            style="top: 60px;">E-mail:</strong> <br/> <span

                            style="top: 80px;">tingo-shoes@mail.ru</span>
                        <br/></div>
                </div>
                <div class="logo-left"><img src="<?php echo base_url('assets/images/chim.png'); ?>">

                    <div class="noidung-slide" style="text-align: justify;"><p><?php if($intro) {echo $intro['title'];} else {?>ООО "Калужская Обувь"<?php }?></p>           <span><?php if($intro) {echo $intro['brief'];} else {?>Компания «Калужская Обувь» предприятие легкой промышленности, специализирующееся на производстве домашней, летней и зимней обуви для активной жизни и отдыха.,..<?php }?>           </span>
                        <br><input type="image" src="<?php echo base_url('assets/images/button.png') ?>" value="" onclick="window.location='<?php echo base_url('index.php/gioithieu')?>'"></div>
                </div>
            </div>
            <div id="main_right">    <!--slide-->
                <div class="specialbox">
                    <div class="specialbox-title"><h2>Новые Модели</h2>

                        <div class="clear"></div>
                    </div>
                    <div class="scrollbar2">
                        <div class="scrollprev"></div>
                        <div class="scrollwrapper">
                            <?php foreach( $lastests as $index => $item ){?>
							<div class="scrollbox <?php if ($index % 3 == 2) {?>lastbox<?php }?>">
                                <div class="scrollbox-content"><span>Артикул: <?php echo $item['masp']; ?></span></div>
                                <img class="scrollbox-image"
                                     src="<?php echo base_url('assets/uploads/images'). '/' .$item['img'];?>" style="width: 100%; height: 100%;" onclick="xemchitiet(<?php echo $item['id']; ?>)"/></div>
                            <?php }?>
                            <div class="clear"></div>
                        </div>
                        <div class="scrollnext"></div>
                        <div class="clear"></div>
                    </div>
                </div>
                <!--noi dung slide-->    <!--huu-->
                <div id="sp1">
				<h2 id="title1">
					<span style="float: left; width: 200px;">Детская Обувь</span>
					<img class="icon" src="<?php echo base_url('assets/images/icon1.png'); ?>" onclick="redirectSelected(5, 11);" />
					<div class="clear"></div>    
				</h2>
	<?php           if (isset($protes2)) {
                        foreach ($protes2 as $i => $item) { ?>
                            <div class="sanpham sanpham-<?php echo $i ?>">
								<img onclick="xemchitiet(<?php echo $item['id'] ?>)" src="<?php echo base_url('assets/uploads/images') . '/' . $item['img']; ?>" />
								<span class="ma"><p>Артикул: <?php echo $item['masp']; ?></p></span>
                            </div>
					<?php 
						}
                    }        ?>    </div>
                <div id="sp2">
					<h2 id="title2">
						<span style="float: left; width: 200px;">Женская Обувь</span> 
						<img class="icon" src="<?php echo base_url('assets/images/icon1.png'); ?>" onclick="redirectSelected(4, 10);">
						<div class="clear"></div>
                    </h2>        
					<?php        
					if (isset($protes1)) {
                        foreach ($protes1 as $i => $item) { ?>
                            <div class="sanpham sanpham-<?php echo $i ?>">
								<img onclick="xemchitiet(<?php echo $item['id'] ?>)" src="<?php echo base_url('assets/uploads/images') . '/' . $item['img']; ?>" alt="">
								<span class="ma"><p>Артикул: <?php echo $item['masp']; ?></p></span>
								<div class="clear"></div>
							</div>
				<?php 	}
                    }
				?>
				</div>
                <div id="sp3">
					<h2 id="title3"><span style="float: left; width: 200px;">Мужская Обувь</span> <img class="icon" src="<?php echo base_url('assets/images/icon1.png'); ?>" onclick="redirectSelected(3, 9);"> </h2>        
		<?php        if (isset($protes)) {
                        foreach ($protes as $i => $item) { ?>
                            <div class="sanpham sanpham-<?php echo $i ?>">
								<img onclick="xemchitiet(<?php echo $item['id'] ?>)" src="<?php echo base_url('assets/uploads/images') . '/' . $item['img']; ?>" alt="" />
								<span class="ma"><p>Артикул: <?php echo $item['masp']; ?></p></span>
								<div class="clear"></div>
							</div>
				<?php 	}
                    }        ?>    
				</div>
            </div>
            <div id="footer">
                <div class="menu">
                    <ul>
                        <li><a href="<?php echo base_url('/index.php/index'); ?>">Домашняя Страница </a></li>
                        <li><a href="#">Оформить Заказ</a></li>
                        <li><a href="#">Контакты</a></li>
                        <li><a href="<?php echo base_url('/index.php/gioithieu'); ?>">О Нас </a></li>
                    </ul>
                </div>
                <div class="text-footer"><p> © Tingo 2002–2013</p></div>
            </div>
        </div>
    </div>
    <script type="text/javascript">    $(".nav-account a").click(function () {
            $(".selected_tab").removeClass("selected_tab").addClass('unselect_tab');
            $(this).parent().addClass("selected_tab").removeClass('unselect_tab');
            $(".account").slideUp();
            var content_show = $(this).attr("title");
            $("." + content_show).slideDown();
			
		
        });
		function redirectSelected(xh, td) {
			var d = new Date();
			if (d.getMonth() > 6) {
				window.location = '<?php echo base_url('/index.php/product?catid=')?>'+td;
			} else {
				window.location = '<?php echo base_url('/index.php/product?catid=')?>'+xh;
			}
		}
		</script>
</div>
</div></body>
</html>